package org.example.springchatroom.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.springchatroom.model.Friend;

import java.util.List;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 九转苍翎
 * Date: 2025/9/6
 * Time: 15:29
 */
@Mapper
public interface FriendMapper {
    @Select("select user_id as friend_id,user_name as friend_name from user where user_id in (select friend_id from friend where user_id = #{userId})")
    List<Friend> selectByUserId(Integer userId);
}
